package com.cwf.quality.model.dto.datacheck.rule;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

@Data
public class CheckRuleInfo {

    private List<String> columnNameList;

    private List<ColumnRange> columnRangeList;

    private List<ColumnLength> columnLengthList;

    private List<ColumnEnumRange> columnEnumRangeList;

    private List<ColumnCodeTable> columnCodeTableList;

    private List<ColumnPrefix> columnPrefixList;


    @AllArgsConstructor
    @Data
    public static class ColumnRange {
        private String columnName;
        private Long min;
        private Long max;
    }

    @AllArgsConstructor
    @Data
    public static class ColumnLength {
        private String columnName;
        private Integer length;
    }

    @AllArgsConstructor
    @Data
    public static class ColumnEnumRange<T> {
        private String columnName;
        private List<T> enumValues;
    }

    @AllArgsConstructor
    @Data
    public static class ColumnCodeTable {
        private String columnName;
        private String codeTableName;
        private String codeTableColumnName;
    }

    @AllArgsConstructor
    @Data
    public static class ColumnPrefix {
        private String columnName;
        private String prefix;
    }
}
